package com.feature.learn.concurrent.Semaphore.sampe1;

/**
 * https://www.cnblogs.com/klbc/p/9500947.html
 * @Description
 * @create 2021/7/2
 * @since 1.0.0
 */
public class Service2Thread extends Thread {

    private Semaphore2Service service;

    public Service2Thread(String name, Semaphore2Service service) {
        super();
        this.setName(name);
        this.service = service;
    }

    @Override
    public void run() {
        this.service.doSomething();
    }
}